package org.spider.model;

import org.springframework.util.StringUtils;

public enum ProxyTypeEnum {

    // 静态IP
    STATICIP,
    // 动态IP
    DYNAMICIP;

    public static ProxyTypeEnum match(String name) {
        if (!StringUtils.hasText(name)) {
            return null;
        }
        for (ProxyTypeEnum proxyTypeEnum : ProxyTypeEnum.values()) {
            if (StringUtils.pathEquals(name, proxyTypeEnum.name())) {
                return proxyTypeEnum;
            }
        }
        return null;
    }
}
